package com.founder.devwork.persistence.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.founder.devwork.dto.AuthorStatsDTO;
import com.founder.devwork.dto.MonthlyStatDTO;
import com.founder.devwork.dto.ProjectSummaryDTO;
import com.founder.devwork.dto.RepositorySummaryDTO;
import com.founder.devwork.entity.Project;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 项目数据访问层接口
 */
@Mapper
public interface ProjectMapper extends BaseMapper<Project> {
    List<RepositorySummaryDTO> getRepositoryByProjectId(String id);

    Page<ProjectSummaryDTO> getProjectSummaries(IPage<ProjectSummaryDTO> page, @Param("name") String name, @Param("sortBy") String sortBy, @Param("sortDir") String sortDir);

    List<MonthlyStatDTO> getProjectMonthlyStats(String projectId);

    List<AuthorStatsDTO> getProjectAuthorStats(String projectId);
}
